<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="main"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title>服务创建</title>
    <link th:href="@{/localcss/crmlist.css}" href="../static/localcss/crmlist.css" rel="stylesheet">
    <style type="text/css">
        table tr{
            line-height: 40px;
        }
        table tr td{
            text-align: center;
        }

        .bg{
            width: 165px;
        }
    </style>
</head>
<body>
<div layout:fragment="content">
    <div class="">
        <div class="clearfix"></div>
        <div class="row">
            <div class="col-md-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>
                            客户服务管理 > 服务创建 <i class="fa fa-user"></i>
                        </h2>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <form class="form-horizontal form-label-left" th:action="@{/service/save}" action="/service/save" method="post">
                        <table width="100%">
                            <tr>
                                <td class="bg">客户</td>
                                <td>
                                    <select name="svrCustNo" id="svrCustNo" class="form-control">
                                        <option value="">--请选择--</option>
                                        <option th:each="customer:${customerList}"
                                                th:value="${customer.custNo}"
                                                th:text="${customer.custName}" value="">姓名</option>
                                    </select>
                                </td>
                                <td>服务类型</td>
                                <td style="text-align: left">
                                    <select name="svrType" id="svrType" class="form-control">
                                        <option value="">--请选择--</option>
                                        <option th:each="type:${typeList}"
                                                th:value="${type.dictValue}"
                                                th:text="${type.dictItem}" value="">等级</option>

                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>创建人</td>
                                <td><input class="form-control" readonly name="" th:value="${session.loginUser.usrName}" /></td>
                                <td>状态</td>
                                <td style="text-align: left;">新创建</td>
                            </tr>
                            <tr>
                                <td>概要</td>
                                <td><input class="form-control" name="svrTitle" value="" /></td>
                                <td>创建时间</td>
                                <td style="text-align: left; " th:text="${#dates.format(#dates.createNow(),  'yyyy-MM-dd HH:mm:ss')}">2023-12-12 11:30:30</td>
                            </tr>
                            <tr>
                                <td>服务请求</td>
                                <td colspan="3">
                                    <textarea name="svrRequest" rows="5" class="form-control"></textarea>
                                </td>
                            </tr>
                        </table>
                            <div class="form-group" style="text-align: center;margin-top: 20px">
                                <button type="button" class="btn btn-primary" id="back">返回</button>
                                <button  type="submit" class="btn btn-dark">保存</button>
                                <span th:text="${msg}" style="color: red"></span>
                            </div>
                        </form>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>
</body>
<script layout:fragment="js">
    $(document).ready(function(){
        $("#back").on("click",function(){
            window.history.back();
        });
    });
</script>
</html>